package com.atguigu.examsystemserver.mapper;



import com.atguigu.examsystemserver.entity.Question;
import com.atguigu.examsystemserver.vo.QuestionQueryVo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;

import java.util.List;
import java.util.Map;

/**
 * 题目Mapper接口
 * 继承MyBatis Plus的BaseMapper，提供基础的CRUD操作
 */
public interface QuestionMapper extends BaseMapper<Question> {

    List<Map<String,Long>> getCategoryQuestionCount();

    IPage<Question> getPageByCondition(Page<Question> questionPage, QuestionQueryVo queryVo);


    Question getQuestionByIdCondition(Long id);

    List<Question> getQuestionListByPaperId(Integer id);
}